//判断是否为空
const checkEmpty = {
    checkEmpty (datas) {
        let checkEmptyFlag = true //判断是否为空  默认为空
        for(let item in datas) {
            //判读是不是对象
            let isObject = datas[item] instanceof Object
            if(isObject) {  //如果是对象就在遍历一次
                let newObject = datas[item]
                for(let value in newObject) {  //只要有一个不为空 就结束循环
                    if(newObject[value] || newObject[value] == 0 ) {
                        checkEmptyFlag = false
                        break
                    }
                }
            }else{
                if(datas[item]) {
                    checkEmptyFlag = false
                    break
                }
            }
        }
        return checkEmptyFlag
    }
}
export default checkEmpty